//
//  YXWorkSummarizeView.m
//  跑跑快销
//
//  Created by 杨潇 on 14-5-6.
//  Copyright (c) 2014年 ylife. All rights reserved.
//

#import "YXWorkSummarizeView.h"

@implementation YXWorkSummarizeView
@synthesize textVi,placeholderLab;

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
        self.backgroundColor = [UIColor grayColor];
        textVi = [[UITextView alloc] initWithFrame:CGRectMake(10, 20, 300, 150)];
        textVi.font = [UIFont systemFontOfSize:16];
        textVi.layer.cornerRadius = 5;
        [self addSubview:textVi];
        
        placeholderLab = [[UILabel alloc] initWithFrame:CGRectMake(0, 10, 300, 20)];
        placeholderLab.font = [UIFont systemFontOfSize:16];
        placeholderLab.text = @"在此记录你今天的工作总结";
        placeholderLab.textColor = [UIColor grayColor];
        [textVi addSubview:placeholderLab];
        
        UIView * downVi = [[UIView alloc]initWithFrame:CGRectMake(0, [UIScreen mainScreen].bounds.size.height - 50 - STARTY, 320, 50)];
        downVi.backgroundColor = [UIColor brownColor];
        [self addSubview:downVi];
        
        for (int i = 0; i < 2; i ++) {
            UIButton * typeBtn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
            typeBtn.backgroundColor = [UIColor whiteColor];
            typeBtn.frame = CGRectMake(30*(i + 1) + 115*i, 5, 115, 40);
            typeBtn.tag = i + 1;
            typeBtn.layer.borderColor = [UIColor blackColor].CGColor;
            typeBtn.layer.borderWidth = .5;
            typeBtn.layer.cornerRadius = 6;
            if (i == 0) {
                [typeBtn setTitle:@"拍照" forState:UIControlStateNormal];
            }else{
                [typeBtn setTitle:@"相册" forState:UIControlStateNormal];
            }
            [downVi addSubview:typeBtn];
        }
    }
    return self;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/

@end
